/**
 * 医德医风人员弹窗模块
 * 
 * @Date: 2018-10-18
 * @author: Jackson wang
 * @version: 1.0
 * @since: 1.0
 */

define([ "jquery", "datagridServ", "sysmanMain" ],
		function($, datagridServ, sysmanMain ) {
			
	'use strict';	
	
	var rootid = "panel-ethic-userlist";
	
	var window_id = "window-ethic-userlist";
	
	var pageUrl = '/common/query/getBizPage.action?subSystem=ethic&code=userList&module=common';
	
	var mainParam;
	
	var public_method = {
			
		openPage:function(_options){
			mainParam = _options;
			$('#'+window_id).empty();
			var rootpath = '/'+ sysmanMain.getRootPath()
			var _config ={
				title	: '选择审批流程',
				width:window_width,
				height:window_height,
				window:$('#'+window_id),
				href:rootpath+pageUrl,
				flag:false
			}
		
			
					
			var _param = $.extend({},_config,_options)
			openParam = _param
			datagridServ.windowEdit(_param);
		},
	
		init:function(_options){
			private_method.init(_options)
		}
	}
	
	var private_method = {
			
		init:function(_options){
			//定义datagrid参数
			private_method.initList(_options);
			//初始化列表
		},
		
		initList:function(){

			var _detailParam = {				
					url : '/'+sysmanMain.getRootPath() + listUrl,
					height:400,					
					rownumbers:true,
					animate: true,									
					striped:true,
					border:true,
					//singleSelect:false,
					idField: 'id',									
					fitColumns: true,
					checkOnSelect:true,
					pagination : true,
					selectOnCheck:true,
					columns:[[
						{field:'deptname',title:'所在科室',width:50,halign:'center'} ,
						{field:'name',title:'姓名',width:100,halign:'center'},        
						
						
						{field:'loginName',title:'登录账号',width:50,halign:'center'},
						{field:'apply_date',title:'发布时间',width:50,halign:'center'} ,
						
						{field:'status',title:'当前状态',width:50,align:'center',
							formatter:function(value,row,index){								
								return '未提交考评';
							}
						}
						
					]]
				}
				var _d = $('#'+rootid + ' .dg-list')
				if(_d.length!=1){
				
					_d.datagrid(_detailParam);
				}

		}
		
	}
	
	return public_method;
	
})